<%
if login="" then login="../login.asp"
if Request.Cookies("admin")("name")="" and Request.Cookies("admin")("password")="" then
   response.Write("<script>window.location.href='"&login&"';</script>")
   response.End()
else
set rsuser=server.CreateObject("adodb.recordset")
sql="select * from admin where name='"&Request.Cookies("admin")("name")&"' "
rsuser.open sql,conn,1,3
if rsuser.eof and rsuser.bof then
   response.write"<script>alert('还没有登陆,或登陆已经超时');</script>"
   response.Write("<script>window.location.href='"&login&"';</script>")
   response.End
else
if Request.cookies("admin")("password") <> rsuser("password") then
   response.Write("<script>window.location.href='"&login&"';</script>")
   response.End()
   end if
   
   menu=rsuser("menu")
   
end if
end if
%>